<?php
defined('BY_JYA') or exit('error');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();

if($_RQ['op']=='get'){
	$return['item']=array();
	$note='$note';
	$wareid='$wareid';
	$optype='$optype';
	$title='$title';
	$return['item']['func1']="cfc('jy_jdapi')->upOrDown($note,$wareid,$optype),$note 为原因,$wareid 为商品id,$optype 为操作类型：1上架 2下架";
	$return['item']['func2']="cfc('jy_jdapi')->updateWareTitle($wareid,$title),$wareid 为商品id,$title 为商品名称";
	$return['item']['func3']="cfc('jy_jdapi')->deleteWare($wareid),$wareid 为商品id";
	$return['item']['func4']="cfc('jy_jdapi')->updateWare($wareid),$wareid 为商品id";
	$return['htmls']=array (
		  'type' => 'edit',
		  'post' => 'post',
		  'edit_tab' => '参数设置',
		  'edits' => 
		  array (
		    0 => 
		    array (
		      'title' => '参数设置',
		      'list' => 
		      array (
				array ('name' => 'appkey','type' => 'string','title' => 'appkey'),
				array ('name' => 'appsecret','type' => 'string','title' => 'appsecret'),
				array ('name' => 'access_token','type' => 'string','title' => 'access_token'),
				array ('name' => 'func1','type'=>'string','title' => '商品上架下架调用方法为','read'=>true,'help'=>'更多使用方法请参考官方文档：http://jos.jd.com/api/index.htm'),
				array ('name' => 'func2','type'=>'string','title' => '修改商品名称调用方法为','read'=>true,'help'=>'更多使用方法请参考官方文档：http://jos.jd.com/api/index.htm'),
				array ('name' => 'func3','type'=>'string','title' => '删除商品调用方法为','read'=>true,'help'=>'更多使用方法请参考官方文档：http://jos.jd.com/api/index.htm'),
				array ('name' => 'func4','type'=>'string','title' => '恢复删除的商品调用方法为','read'=>true,'help'=>'更多使用方法请参考官方文档：http://jos.jd.com/api/index.htm'),
		      ),
		    ),
		  ),
		);
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();	
	$this->save_setting($postdata);
	exi('设置成功！','','/setting/');
}
?>